In recent years, moving image coding methods such as MPEG (Moving Picture Expert Group) coding having an inter-frame motion-compensation function have been rapidly put into practical use by development of semiconductor technology or the like. As video coding standards, defined are MPEG-1 (ISO/IEC 11172-2), MPEG-2 (ISO/IEC 13818-2) and MPEG-4 (ISO/IEC 14496-2) providing an inter-frame motion-compensation function.
FIG. 7 shows an example of frame structure with motion compensation employed in MPEG video coding.
In FIG. 7, in an I (Intra) frame, coding is completed within the frame (intra-frame coding), and in a P (Predictive) frame, only a past frame to the time axis is used in motion prediction (forward prediction). Further, in a B (Bi-directional) frame, past and future frames to the time axis are used in motion prediction (bi-directional prediction).
In the MPEG-4 coding, the use of B frame may be limited in a profile regulation. Arbitrary plural frames can be handled as a group as GOP (Group Of Pictures). In FIG. 7, frames 1 to 15 are handled as one GOP.
In the MPEG standards, the coding rate is controlled by using a virtual buffer, VBV (Video Buffering Verifier). The VBV will be described with reference to FIG. 8. FIG. 8 is a graph showing time change of buffer occupation amount.
The VBV buffer size is defined by profile. For example, in the MP@ML (main profile, main level) already used in many applications, the maximum VBV buffer size is 1,835,008 bits.
The encoder controls a coding amount to each frame while monitoring the VBV buffer size. A virtual decoder capable of instantaneous decoding by frame is prepared, to read data from the buffer instantaneously and decode the data.
At this time, buffer overflow is prohibited in any case. Further, buffer underflow must not occur except in a low-delay mode. On the other hand, in the low-delay mode, the buffer underflow may occur, however, there is a possibility that a frame skip state (the same frame is repeatedly played back for a predetermined period) occurs.
Since the VBV buffer is a virtual buffer, the occupancy of the VBV buffer itself is detected on the decoder side in frame units (or field units in minimum time), but it is not set in code data for transmission.
Next, an example where MPEG data is recorded on a random-inaccessible medium such as a magnetic tape, will be considered. FIG. 10 shows recording tracks on the magnetic tape. A magnetic tape T as a recording medium has a recording unit called “track” scanned by a head. In the figure, tracks 1001 to 1048 are formed in a direction intersecting a tape running direction at a predetermined angle.
Further, as a countermeasure for reading error, an ECC (Error Correction Code) is added by at least one track. This is called an ECC interleave block. In FIG. 10, 16 tracks constitute 1 ECC interleave block. More specifically, tracks 1001 to 1016 constitute an ECC interleave block 1; tracks 1017 to 1032, an ECC interleave block 2; and tracks 1033 to 1048, an ECC interleave block 3.
Accordingly, additional recording, overwriting and the like can be made by ECC interleave block. Further, Japanese Patent Application Laid-Open No. 11-213566 discloses recording by GOP corresponding to at least one ECC interleave block.
Further, as a method for scene-sequence photographing with such medium, Japanese Patent Application Laid-Open No. 2001-195840 discloses processing of appropriately inserting invalid data before and after scene-sequence photographing thereby temporarily increasing the coding rate.
However, the conventional techniques as described above have the following problems.
First, when scene-sequence photographing is to be performed, as the information on buffer occupation amount is lost, trouble may occur in the rate control function and reproduction. FIG. 9 is a graph similar to FIG. 8 showing time change of buffer occupation amount. In FIG. 9, the information on buffer occupation amount is lost upon start of scene-sequence photographing (t0), then the buffer occupation amount exceeds the VBV buffer size, and buffer overflow occurs.
Secondly, in a case where invalid data is appropriately inserted for prevention of buffer overflow after the start of scene-sequence photographing, the buffer occupation amount is further increased (i.e., the rate is increased), and the rate control itself may be harmfully influenced.
Thirdly, after the scene-sequence photographing, a similar problem occurs in the portion of scene-sequence photographing and the previously-recorded background portion, which degrades image quality upon reproduction.
Accordingly, in the conventional methods, seamless scene-sequence photographing cannot be performed without difficulty.